Module 2: Types of Machine Learning

2.1 Supervised Learning

Supervised Learning is the most common type of machine learning. It involves training a model on a labeled dataset — meaning the input data already has known output values. The goal is to learn a function that maps inputs to outputs accurately.

Example: Email spam detection — the system is trained on emails labeled as "spam" or "not spam," and learns to classify future emails accordingly.
Key Characteristics:
  • Uses labeled data for training
  • Common tasks: classification & regression
  • Requires large, high-quality labeled datasets
Interesting Fact: Most self-driving car systems are initially trained using supervised learning from millions of miles of human driving data.

2.2 Unsupervised Learning

Unsupervised Learning works with **unlabeled data**. The model tries to find patterns, groupings, or structure in the data without any explicit instructions on what to look for. It’s commonly used for clustering, dimensionality reduction, and anomaly detection.

Example: Customer segmentation — an e-commerce platform groups users based on behavior (clicks, purchases, time spent) without knowing their intent beforehand.
Key Characteristics:
  • No labeled output — model finds hidden patterns
  • Used for clustering, association, and anomaly detection
  • Can uncover insights humans might miss
Interesting Fact: Unsupervised learning helped astronomers discover new types of stars by clustering unexplained brightness patterns in telescope data.

2.3 Reinforcement Learning

Reinforcement Learning (RL) is based on **learning through trial and error**. An agent interacts with an environment, makes decisions, and receives rewards or penalties. Over time, it learns the optimal behavior to maximize cumulative rewards.

Example: A robot learning to walk — it receives positive feedback for forward motion and negative feedback for falling, eventually learning how to walk efficiently.
Key Characteristics:
  • Involves agents, actions, environments, and rewards
  • Used in gaming, robotics, and autonomous systems
  • Learns optimal policy over time through feedback
Interesting Fact: AlphaGo, the program that defeated the world champion in Go, used reinforcement learning to teach itself better strategies by playing millions of games.